#ifndef TURTLESIMDIALOG_H
#define TURTLESIMDIALOG_H

//(*Headers(TurtleSimDialog)
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/spinctrl.h>
#include <wx/panel.h>
#include <wx/button.h>
#include <wx/dialog.h>
#include <wx/timer.h>
//*)

#include "ros/ros.h"
#include "std_msgs/String.h"
#include "RosInterface.h"

class TurtleSimDialog: public wxDialog, public RosInterface
{
	public:

		TurtleSimDialog(wxWindow* parent,wxWindowID id=wxID_ANY);
		virtual ~TurtleSimDialog();

		//(*Declarations(TurtleSimDialog)
		wxStaticText* StaticText2;
		wxStaticText* StaticText6;
		wxSpinCtrl* SpinCtrlLinearSpeed;
		wxTextCtrl* TextCtrl_Y;
		wxTextCtrl* TextCtrl_X;
		wxPanel* Panel1;
		wxStaticText* StaticText1;
		wxButton* ButtonClear;
		wxStaticText* StaticText3;
		wxStaticText* StaticText5;
		wxStaticText* StaticText7;
		wxStaticText* StaticText4;
		wxSpinCtrl* SpinCtrlAngularSpeed;
		wxTextCtrl* TextCtrl_Theta;
		wxTimer Timer1;
		//*)
        wxString *wxX, *wxY, *wxTheta;
	protected:

		//(*Identifiers(TurtleSimDialog)
		static const long ID_STATICTEXT1;
		static const long ID_STATICTEXT2;
		static const long ID_STATICTEXT3;
		static const long ID_TEXTCTRL1;
		static const long ID_TEXTCTRL2;
		static const long ID_TEXTCTRL3;
		static const long ID_STATICTEXT4;
		static const long ID_STATICTEXT5;
		static const long ID_STATICTEXT6;
		static const long ID_SPINCTRL1;
		static const long ID_SPINCTRL2;
		static const long ID_STATICTEXT7;
		static const long ID_BUTTON1;
		static const long ID_PANEL1;
		static const long ID_TIMER1;
		//*)
		//RosInterface *turtle;

        //void turttleposeCallback(const std_msgs::String::ConstPtr& msg);
        virtual void turttleposeCallback(const turtlesim::Pose::ConstPtr& msg);
        void OnPanel1Paint(wxPaintEvent& event);
    public:
        void AddTurtleInterface(RosInterface *rf);
	private:

		//(*Handlers(TurtleSimDialog)
		void OnSpinCtrlLinearSpeedChange(wxSpinEvent& event);
		void OnSpinCtrlAngularSpeedChange(wxSpinEvent& event);
		void OnTimer1Trigger(wxTimerEvent& event);
		void OnButtonClearClick(wxCommandEvent& event);
		//*)

		DECLARE_EVENT_TABLE()
};

#endif
